package com.example.workbook.mapper;

import com.example.workbook.model.domain.Content;
import com.example.workbook.model.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author 53067
* @description 针对表【user】的数据库操作Mapper
* @createDate 2023-08-09 14:26:33
* @Entity com.example.workbook.model.domain.User
*/
@Repository
public interface UserMapper extends BaseMapper<User> {
    List<User> getUsersWithContent();
//    @Select("select * from user")
//    @Results({
//            @Result(column = "id", property = "id"),
//            @Result(column = "username", property = "username"),
//            @Result(column = "password", property = "password"),
//            @Result(column = "user_id", property = "content", javaType = Content.class,
//                    one = @One(select = "com.example.demo.mapper.RoleMapper.selectById")
//            )
//    })
}




